3.10.96 \(\int \frac {A+B x}{b x+c x^2} \, dx\)

Optimal. Leaf size=29 \[ \frac {(b B-A c) \log (b+c x)}{b c}+\frac {A \log (x)}{b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {631} \begin {gather*} \frac {(b B-A c) \log (b+c x)}{b c}+\frac {A \log (x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(b*x + c*x^2),x]

[Out]

(A*Log[x])/b + ((b*B - A*c)*Log[b + c*x])/(b*c)

Rule 631

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)
*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0]
|| EqQ[a, 0])

Rubi steps

\begin {align*} \int \frac {A+B x}{b x+c x^2} \, dx &=\int \left (\frac {A}{b x}+\frac {b B-A c}{b (b+c x)}\right ) \, dx\\ &=\frac {A \log (x)}{b}+\frac {(b B-A c) \log (b+c x)}{b c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 29, normalized size = 1.00 \begin {gather*} \frac {(b B-A c) \log (b+c x)}{b c}+\frac {A \log (x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(b*x + c*x^2),x]

[Out]

(A*Log[x])/b + ((b*B - A*c)*Log[b + c*x])/(b*c)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x}{b x+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x)/(b*x + c*x^2),x]

[Out]

IntegrateAlgebraic[(A + B*x)/(b*x + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 28, normalized size = 0.97 \begin {gather*} \frac {A c \log \relax (x) + {\left (B b - A c\right )} \log \left (c x + b\right )}{b c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+b*x),x, algorithm="fricas")

[Out]

(A*c*log(x) + (B*b - A*c)*log(c*x + b))/(b*c)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 31, normalized size = 1.07 \begin {gather*} \frac {A \log \left ({\left | x \right |}\right )}{b} + \frac {{\left (B b - A c\right )} \log \left ({\left | c x + b \right |}\right )}{b c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+b*x),x, algorithm="giac")

[Out]

A*log(abs(x))/b + (B*b - A*c)*log(abs(c*x + b))/(b*c)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 32, normalized size = 1.10 \begin {gather*} \frac {A \ln \relax (x )}{b}-\frac {A \ln \left (c x +b \right )}{b}+\frac {B \ln \left (c x +b \right )}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(c*x^2+b*x),x)

[Out]

-1/b*ln(c*x+b)*A+1/c*ln(c*x+b)*B+A/b*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 29, normalized size = 1.00 \begin {gather*} \frac {A \log \relax (x)}{b} + \frac {{\left (B b - A c\right )} \log \left (c x + b\right )}{b c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+b*x),x, algorithm="maxima")

[Out]

A*log(x)/b + (B*b - A*c)*log(c*x + b)/(b*c)

________________________________________________________________________________________

mupad [B]  time = 1.40, size = 28, normalized size = 0.97 \begin {gather*} \frac {A\,\ln \relax (x)}{b}-\ln \left (b+c\,x\right )\,\left (\frac {A}{b}-\frac {B}{c}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(b*x + c*x^2),x)

[Out]

(A*log(x))/b - log(b + c*x)*(A/b - B/c)

________________________________________________________________________________________

sympy [A]  time = 0.41, size = 41, normalized size = 1.41 \begin {gather*} \frac {A \log {\relax (x )}}{b} + \frac {\left (- A c + B b\right ) \log {\left (x + \frac {- A b + \frac {b \left (- A c + B b\right )}{c}}{- 2 A c + B b} \right )}}{b c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x**2+b*x),x)

[Out]

A*log(x)/b + (-A*c + B*b)*log(x + (-A*b + b*(-A*c + B*b)/c)/(-2*A*c + B*b))/(b*c)

________________________________________________________________________________________